//
//  MainTableViewCell.m
//  cherryPicker
//
//  Created by Young Soo Yun on 12. 1. 6..
//  Copyright (c) 2012 Happy. All rights reserved.
//

#import "MainTableViewCell.h"

#import "StringUtils.h"

@implementation MainTableViewCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

#pragma mark -

- (void)setData:(NSString*)strName
   strDelimiter:(NSString*)strDelimiter
  strTotalPrice:(NSString*)strTotalPrice
  limitPrice:(NSInteger)limitPrice{
    _labName.text = strName;
    _labDelimiter.text = strDelimiter;
    _labTotalPrice.text = [NSString stringWithFormat:@"%@", [StringUtils moneyFormat:strTotalPrice]];
    
    [_cardGraph updateData:[strTotalPrice floatValue] limitPrice:(float)limitPrice];
}

@end
